package cn.edu.swu.gyt;

public class Main {
    public static void main(String[] args) {
        //创建初始化
        Student s1=new Student("S22202401","Tom","man",19);
        Student s2=new Student("S22202402","Mary","woman",18);
        Course  c1=new Course("C001","JavaWeb应用开发","刘教授");
        Course  c2=new Course("C002","数据库原理","王教授");

        //输出
        System.out.println("--- 学生信息 ---");
        s1.showInfo();
        s2.showInfo();
        System.out.println("--- 课程信息 ---");
        c1.showInfo();
        c2.showInfo();
        //修改
        s1.setAge(18);
        c2.setTeacher("宋教授");
        //输出
        System.out.println("--- 修改后 ---");
        System.out.println("--- 学生信息 ---");
        s1.showInfo();
        s2.showInfo();
        System.out.println("--- 课程信息 ---");
        c1.showInfo();
        c2.showInfo();
    }
}
